Short{Paste} is a simple, open-source URL shortener that allows you to create short links and share them easily. In this tutorial, we will go through the steps to install Short{Paste} on the latest version of MXLinux.
Before we begin, ensure that you have the following:
Open the terminal emulator on your MXLinux machine.
Ctrl + Alt + T
.Install the required software packages using the following command:
sudo apt install git curl apache2 libapache2-mod-php php7.4-gd php7.4-curl
This will install the git
, curl
, apache2
, libapache2-mod-php
, php7.4-gd
, and php7.4-curl
packages on your system.
Change into the var
directory using the following command:
cd /var
Clone the Short{Paste} repository using the following command:
sudo git clone https://github.com/adyanth/shortpaste.git
This will create a shortpaste
directory in the /var
directory.
Copy the .htaccess.sample
file to .htaccess
using the following command:
sudo cp /var/shortpaste/.htaccess.sample /var/shortpaste/.htaccess
This will rename the .htaccess.sample
file to .htaccess
.
Change into the shortpaste
directory using the following command:
cd /var/shortpaste
Copy the config.sample.php
file to config.php
using the following command:
sudo cp config.sample.php config.php
Edit the config.php
file using your preferred text editor:
sudo nano config.php
Modify the following parameters in the config.php
file to match your settings:
define('SHORTEN_URL', '');
define('DB_HOST', '');
define('DB_NAME', '');
define('DB_USER', '');
define('DB_PASS', '');
Replace the empty string (''
) with your desired value.
For example, to change the SHORTEN_URL
parameter, replace the empty string with:
define('SHORTEN_URL', 'https://example.com/');
Save the changes and exit the editor.
Enable the rewrite
module using the following command:
sudo a2enmod rewrite
Restart the Apache web server using the following command:
sudo systemctl restart apache2
Finally, open your favourite web browser and go to http://localhost/shortpaste
to access Short{Paste}.
Congratulations! You have successfully installed Short{Paste} on MXLinux.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!